//
// Created by konglinglong on 2020/9/24.
//

#include <pthread.h>
#include "../../include/osal/osThread.h"

int32_t OS_ThreadCreate(pthread_t *tid, os_thread_routine routine, void *arg)
{
    int32_t rc;

    if((rc = pthread_create(tid, NULL, routine, arg)) != 0)
    {
        printf("pthread_create() failed! rc = %d\n", rc);
        return CSP_RC_ER;
    }

    return CSP_RC_OK;
}

int32_t OS_ThreadCancel(pthread_t tid)
{
    return pthread_cancel(tid);
}

